/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cp2004_assignment2;
import java.awt.Color;
import javax.swing.*;
import java.awt.event.*;
/**
 *
 * @author zhaoyingxi JCU Student Number: 11839209
 */
public class SCMSFrame extends JFrame {
    JMenuBar Menu;
    JMenu menu = new JMenu("Click here");
    JMenu menu1 = new JMenu("product");
    JButton jButton = new JButton();
    JMenuItem product, inventory, productInventory, Exit;

public SCMSFrame() {
        Menu = new JMenuBar();
        setTitle("******Supply Chain Management Software******");
        jButton.setText("SCMS View");
        this.setBackground(Color.YELLOW);
        setJMenuBar(Menu);
        productInventory = new JMenuItem("->productInventoty");
        product = new JMenuItem("->Products");
        inventory = new JMenuItem("->Inventories");
        Exit = new JMenuItem("->Exit");
        Menu.add(menu);
        menu.add(productInventory);
        menu.add(product);
        menu.add(inventory);
        menu.add(Exit);
        Exit.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                System.exit(1);//quit
            }
  });

    product.addActionListener(new ProductListener(this));
}
public class ProductListener implements ActionListener {

        SCMSFrame frames;
        ProductPanel panel;

        public ProductListener(SCMSFrame frm) {
            //this.frames = i;  //need correct
            panel = new ProductPanel();
        }

        public void actionPerformed(ActionEvent e) {
            //need imp...?
        }
    }
}